home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / tone.arc / TONE.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-11-26  |  896 b   |  29 lines

  1. ; ROUTINE TO MAKE TONE
  2. ;
  3. tone    proc    far
  4. ;
  5.         push    dx              ; save registers
  6.         push    cx
  7.         push    ax
  8. ;
  9. ; compute the frequency and set up the tone
  10.         call    freq            ; convert the frequency
  11.         call    toneset         ; set up the tone
  12. ;
  13. ; turn on the tone
  14.         call    toneon          ; turn it on
  15. ;
  16. ; wait for proper delay
  17.         mov     cx,dx           ; get delay length
  18.         call    delay
  19. ;
  20. ; turn off the tone
  21.         call    toneoff         ; turn it off
  22. ;
  23.         pop     ax              ; restore registers
  24.         pop     cx
  25.         pop     dx
  26.         ret
  27. ;
  28. tone    endp
  29.